﻿@using Webdiyer.WebControls.Mvc;
@model Webdiyer.WebControls.Mvc.PagedList<BaseData.Model.DeliveryMan>
@{
    var idx = 0;

}


<table class="table table-hover">
    <thead>
    <tr>
        <th>
            序号
        </th>
        <th>
            姓名
        </th>
        <th>
            身份证
        </th>
        <th>
            联系电话
        </th>
        <th>
            所属区域
        </th>
        <th>
            操作
        </th>
    </tr>
    </thead>
    @foreach (var item in Model)
    {
        idx++;
        <tr>
            <td>
                @idx
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DeliveryManName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IDNumber)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Mobile)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Area.AreaName)
            </td>
            <td>
                <a title="编辑" data-placement="bottom" data-toggle="tooltip" href="javascript:Edit('@item.DeliveryManID');"><span class=" glyphicon glyphicon-edit"></span></a>
                &nbsp;&nbsp;
                <a title="删除" data-placement="bottom" data-toggle="tooltip" href="javascript:Delete('@item.DeliveryManID')"><span class="glyphicon glyphicon-trash"></span></a>

            </td>
        </tr>
    }

</table>

<hr />
<div style="padding-top:5px; width:100%">
    <div style="float:left">共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录，当前为第 @Model.CurrentPageIndex 页</div>
    @Ajax.Pager(Model, new PagerOptions { PageIndexParameterName = "id", ShowPageIndexBox = false, PageIndexBoxType = PageIndexBoxType.DropDownList, ShowGoButton = false }, new MvcAjaxOptions { UpdateTargetId = "tables", DataFormId = "searchForm" }, new { style = "float:right" })
</div>